#include <iostream>
#include <iomanip> // For std::hex and std::setw

// Function to print the hexadecimal representation of a string
void printStringAsHex(const std::string &str)
{
    std::cout << "Hexadecimal representation: ";
    for (char c : str)
    {
        std::cout << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(static_cast<unsigned char>(c)) << " ";
    }
    std::cout << std::endl;
}

int main()
{
    std::string testString = "Hello, World!";
    printStringAsHex(testString);
    return 0;
}